{include file="public/header" /}
<body class="gray-bg">
<div class="wrapper wrapper-content">
    <div class="ibox float-e-margins">
        <div class="ibox-content">
            <div class="row">
                <!--搜索框开始-->
                <div class="col-sm-12">
                    <div class="layui-form layui-form-item">

                        <div class="layui-col-md6 layui-input-inline" style="margin-top: 5px">
                            <input type="text" id="keyword" class="layui-input search" name="keyword" value="" placeholder="老师名字"/>
                        </div>
                        <div class="layui-input-inline" style="margin-top: 5px">
                            <button class="layui-btn" lay-submit="" lay-filter="LAY-search">立即搜索</button>
                            <button  class="layui-btn layui-btn-normal" id="empty"  lay-submit="" lay-filter="LAY-search">重置</button>
                        </div>
                    </div>
                </div>
            </div>
            <div class="hr-line-dashed"></div>

            <div class="example-wrap">
                <div class="example">
                    <table class="layui-hide" id="test" lay-filter="demo"></table>
                    <!--操作模板-->
                    <script type="text/html" id="plan_status">
                    {{# if(d.plan_status == 1){ }}
                    未上课
                    {{# } }}
                    {{# if(d.plan_status == 2){ }}
                    进行中
                    {{# } }}
                    {{# if(d.plan_status == 3){ }}
                    已结束
                    {{# } }}
                    </script>
                    <script type="text/html" id="plan_online">
                    {{# if(d.plan_online == 1){ }}
                    上架
                    {{# } }}
                    {{# if(d.plan_online == 2){ }}
                    下架
                    {{# } }}
                    </script>
                    <!--<script type="text/html" id="opeBar">-->
                        <!--<a href="javascript:;" onclick="wk.layer_show('查看大纲内容', '{:url('list_info')}?l_id={{d.l_id}}')" class="btn btn-primary btn-xs m-r-xs" title="查看大纲内容">查看大纲内容</a>-->
                    <!--</script>-->
                </div>
            </div>
        </div>
    </div>
</div>
{include file="public/footer" /}
<script>
    //layui渲染数据表格
    layui.use('table', function () {
        var table = layui.table
                , form = layui.form;
        table.render({
            elem: '#test'
            , url: '{:url("Member/planinfos")}'
            ,response: {
                statusCode: 220 //成功的状态码，默认：0
            }
            , page: true
            , where: {'user_id':{$user_id}}
//            , size: 'lg' //sm小尺寸的表格 lg大尺寸
            , cellMinWidth: 150
            , limits: [5, 10, 15, 20, 25, 300]
            , limit: "{:config('pages')}"
            , loading: true
            , id: 'testReload'
            , cols: [[
                 {type:'numbers', width: 60, title: '序号'}
                , {field: 'p_name', width: '', title: '课程名字', align: 'center'}
                , {field: 'plan_typename', width: '', title: '计划名字', align: 'center'}
                , {field: 'user_username', width: '', title: '教师名字', align: 'center'}
                , {field: 'plan_start_time', width: '', title: '上课时间', align: 'center'}
                , {field: 'plan_address', width: '', title: '上课地址', align: 'center'}
                , {field: 'plan_status', width: '', title: '上课状态', align: 'center',toolbar: '#plan_status'}
                , {field: 'plan_online', width: '', title: '计划状态', align: 'center',toolbar: '#plan_online'}
                , {field: 'plan_admin', width: '', title: '添加人', align: 'center'}
                , {field: 'plan_time', width: '', title: '添加时间', align: 'center'}
//                , {fixed: 'right', width:150, title: '操作', align: 'center', toolbar: '#opeBar'}
            ]]
            ,done: function (res, curr, count) {
                $('.img-circle').viewer({
                    url: 'data-original',
                });
            }
        });
    });
</script>
</body>
</html>